home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 10510 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: news.iadfw.net!usenet
  2. From: Mark Nelson <markn@airmail.net>
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Calling DLL-Functions?
  5. Date: Wed, 06 Mar 1996 16:59:50 -0600
  6. Organization: customer of Internet America
  7. Message-ID: <313E18E6.494E@airmail.net>
  8. References: <4hhsr6$vm5@taco.cc.ncsu.edu> <4hktpc$1h2@vega.info.isbiel.ch>
  9. NNTP-Posting-Host: dal22-02.ppp.iadfw.net
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0 (Win95; I)
  14.  
  15. Juestrich Marc wrote:
  16. > I'm just a beginner in programming C/C++, so it's maybe easy to anser this
  17. > basic question:
  18. > How can I call a Function in a DLL. I've got the description of this DLL
  19.  
  20. C/C++ programmers usually call functions in a DLL by linking their 
  21. application to an import library.  The import library is a .LIB file that 
  22. contains information on the ordinals and names of the functions in a DLL.  If 
  23. you don't have an import library for a given DLL, you can even create one 
  24. using an IMPLIB utility.
  25.  
  26. Current versions of most PC based C++ compilers come with import libraries 
  27. already built for windows DLLs like USER.EXE.  
  28.  
  29. You can also do it dynamically via calls to LoadLibrary() and 
  30. GetProcAddress(), but it requires more work on your part.  If you don't have 
  31. a need for run time function binding, the import library is the way to go.
  32.  
  33. Mark Nelson
  34. http://web2.airmail.net/markn
  35.